<?php

	$conn = sybase_connect('sun192.168.90.80,50000', 'sa', '#mayflower');

	sybase_select_db('mlh_a');
	//$sql = 'SELECT * FROM area';
	$sql = "SELECT nos, cusno, incusno, outdate, per, nb FROM trun WHERE outdate >'20090810' ORDER BY outdate";
	$query = sybase_query($sql);
	$row_count = sybase_num_rows( $query );
	//echo $row_count;
	$str = "";
	for($i = 0; $i < $row_count; $i++)
	{
		$row = sybase_fetch_assoc($query);
		//echo $row["areacode"].",".$row["areaname"];
		$str = $str.$row["nos"]."|".$row["cusno"]."|".$row["incusno"]."|".$row["outdate"]."|".$row["per"]."|".$row["nb"].",";
	}
	echo $str;
	//echo "connect success";
?>